package com.bana.fvs.app.mvp.contract;

import android.app.Activity;

import com.bana.fvs.app.module.tab2.entity.ControlResultBean;
import com.bana.fvs.app.module.tab2.tab2Detail.entity.EquipListItemBean;
import com.bana.fvs.app.mvp.model.BaseModel;
import com.bana.fvs.app.mvp.presenter.BasePresenter;
import com.bana.fvs.app.mvp.view.IBaseView;
import com.wei.commonlibrary.net.OkhttpRequest;

import java.util.List;

/**
 * Author : yanftch
 * Date : 2018/3/2
 * Time : 22:36
 * Desc : 设备列表TAB中的【故障】【正常】【全部】三个TAB使用
 */

public interface EquipListContract {
    abstract class AbsEquipListModel extends BaseModel {
        /**
         * 能见度检测仪控制
         *
         * @param activity
         * @param token
         * @param sbbm     设备编码
         * @param kzcz     控制操作
         * @return
         */
        public abstract OkhttpRequest http_controlVisibility(Activity activity, String token, String sbbm, String kzcz);

        /**
         * 区域控制
         *
         * @param activity
         * @param token
         * @param sbbm     设备编码
         * @param kzcz     控制操作
         * @return
         */
        public abstract OkhttpRequest http_controlController(Activity activity, String token, String sbbm, String kzcz);

        /**
         * 雾灯控制
         *
         * @param activity
         * @param token
         * @param sbbm     设备编码
         * @param kzcz     控制操作
         * @return
         */
        public abstract OkhttpRequest http_controlLamp(Activity activity, String token, String sbbm, String kzcz);

        //结束巡检
        public abstract OkhttpRequest http_getEquipList(Activity activity, String token, String sblx, String sbzt, String wqbm, int pagenum);
    }

    abstract class AbsEquipListPresenter extends BasePresenter<AbsEquipListModel, IEquipListView> {
        public abstract void http_controlLamp(Activity activity, String token, String sbbm, String kzcz);

        public abstract void http_controlController(Activity activity, String token, String sbbm, String kzcz);

        public abstract void http_controlVisibility(Activity activity, String token, String sbbm, String kzcz);

        public abstract void http_getEquipList(Activity activity, String token, String sblx, String sbzt, String wqbm, int pagenum);
    }

    interface IEquipListView extends IBaseView<List<EquipListItemBean>> {
        void onVisibilityResult(ControlResultBean bean);

        void onControllerResult(ControlResultBean bean);

        void onLampResult(ControlResultBean bean);
    }
}
